package com.mytijian.code.service;

import com.mytijian.code.model.Mcode;
import com.mytijian.code.model.MerchantOrder;

import java.util.List;

/**
 * Created by shjh on 2017/9/16.
 */
public interface CodeService {
    /**
     * 通过码获取码详情
     * @param code
     * @return
     */
	Mcode getCodeByCode(String code);

    List<Mcode> saveMcodes(MerchantOrder tmOrder);

    List<Mcode> listMcodeByOuterId(String outerId);

    boolean checkCodeAvailable(Mcode mcode);

    void validCode(Mcode code);

    int updateMcode(Mcode mcode);

    int updateMcodeByOuterId(Mcode mcode);

    List<Mcode> listNeedConsumeCode();

    void refundCodesByOrderId(String outerId);
}
